package com.gelapps.memogel;

import java.io.File;

public class Constants {
	
	private static final String S_KEY = "sKey";
    //private static final String SEED_KEY ="618970019642690137449562111";
    private static final String END_OF_LINE = "\n";
    private static final String STR_EMPTY = "";

    private static final int RESULT_NO_EDIT = 0;
    private static final int RESULT_EDIT = 1;

	private static final String DIR_FILE_CONF = "file";
	private static final String FILE_MASTER_PWD ="pwdMaster.txt";

	private static final String PREF_STRING_CARD = "prefSaveCard";
	private static final String PREF_STRING_CREDENTIAL = "prefSaveCredential";
	private static final String PREF_STRING_ACCOUNT = "prefSaveAccount";
    private static final String PREF_STRING_TIME_EXPIRY = "prefExpiryTime";
    private static final String PREF_STING_SHOW_PASS = "prefShowPass";
    private static final String PREF_STRING_EMPTY_FIELD = "prefShowEmpty";

    private static final boolean PREF_BOOL_CARD = true;
    private static final boolean PREF_BOOL_CREDENTIAL = true;
    private static final boolean PREF_BOOL_ACCOUNT = false;
    private static final int PREF_TIME_EXPIRY = 120;
    private static final boolean PREF_BOOL_SHOW_PASS = false;
    private static final boolean PREF_BOOL_EMPTY_FIELD = true;

	private static final String HEAD_XML_FILE="<?xml version=\"1.0\"?>";
	private static final String HEAD_OPEN_XML = "<";
	private static final String HEAD_CLOSE_XML = "</";
	private static final String TAIL_XML = ">";

	private static final String FILE_CREDENTIALS = "credentials.xml";
    private static final String FILE_CARD = "cards.xml";
    private static final String FILE_ACC = "accounts.xml";

	private static final String CREDENTIALS_ROOT = "credentials";
    private static final String CREDIT_CARDS_ROOT="creditCard";
    private static final String ACCOUNT_ROOT = "account";

	private static final String CREDENTIALS_ELEMENT = "dc";
    private static final String CARD_ELEMENT="cc";
    private static final String ACCOUNT_ELEMENT = "acc";

	private static final String TAG_NAME = "name";
	private static final String TAG_USERNAME = "user";
    private static final String TAG_PASSWORD = "password";
	private static final String TAG_DATE_CREATED = "dateCreated";
	private static final String TAG_EXPIRY = "expiry";
	private static final String TAG_DATE_LAST_USED = "dateLastUsed";
	private static final String TAG_SITE = "site";
	private static final String TAG_NOTE = "note";
	private static final String TAG_NUMBER ="number";
	private static final String TAG_PIN ="pin";
	private static final String TAG_CVV ="cvv";
	private static final String TAG_PHONE ="phone";
	private static final String TAG_CIRCUITS ="circuits";
	private static final String TAG_BALANCE ="balance";
    private static final String TAG_HOLDER ="holder";
    private static final String TAG_BILL_ADDRESS ="billAddress";
	private static final String TAG_BANK ="bank";
	private static final String TAG_WEBSITE ="website";
    private static final String TAG_SERVER = "server";
    private static final String TAG_PATH = "path";
    private static final String TAG_PROVIDER = "provider";

    //private static final String ACCOUNT_PROVIDER_WEB_SITE = "providerWebSite";
    //private static final String ACCOUNT_PROVIDER_PHONE = "providerPhone";
    //private static final String CARD_NAME="name";
	//private static final String CARD_NOTE="note";
    //private static final String TAG_PASS = "pwd";
    //private static final String ACCOUNT_NAME = "name";
    //private static final String ACCOUNT_USERNAME = "username";
    //private static final String ACCOUNT_NOTE = "note";
    //private static final String CARD_EXPIRY="expiry";


    public static String getKeyString() { return S_KEY;}
    public static String getEndOfLine() { return END_OF_LINE;}
    public static String getEmptyString() { return STR_EMPTY;}

    public static int getResultNoEdit() { return RESULT_NO_EDIT;}
    public static int getResultEdit() { return RESULT_EDIT;}
	
	public static String getPrefCard() { return PREF_STRING_CARD;}
	public static String getPrefCredential() { return PREF_STRING_CREDENTIAL;}
	public static String getPrefAccount() { return PREF_STRING_ACCOUNT;}
    public static String getPrefStringTimeExpiry() { return PREF_STRING_TIME_EXPIRY;}
    public static String getPrefShowEmpty() { return PREF_STRING_EMPTY_FIELD;}
    public static boolean getPrefDefaultCard() { return PREF_BOOL_CARD;}
    public static boolean getPrefDefaultCredential() { return PREF_BOOL_CREDENTIAL;}
    public static boolean getPrefDefaultAccount() { return PREF_BOOL_ACCOUNT;}
    public static int getPrefTimeExpiry() { return PREF_TIME_EXPIRY;}                               //TODO
    public static String getPrefStringShowPass() { return PREF_STING_SHOW_PASS;}
    public static boolean getPrefDefaultShowPass() { return PREF_BOOL_SHOW_PASS;}
    public static boolean getPrefDefaultShowEmpty() { return PREF_BOOL_EMPTY_FIELD;}
	
	public static String getHeadOpenXML() { return HEAD_OPEN_XML;}
	public static String getHeadCloseXML() { return HEAD_CLOSE_XML;}
	public static String getTailXML() { return TAIL_XML; }
	public static String getHeadXmlFile() { return HEAD_XML_FILE; }
	
	public static String getPathMasterPWD()	{ return getDirFileConf() + File.pathSeparatorChar + FILE_MASTER_PWD;}
	
	public static String getDirFileConf() { return DIR_FILE_CONF; }
	
	public static String getPathCredentialsFile() {return getDirFileConf() + File.pathSeparatorChar + FILE_CREDENTIALS;}
	public static String getCredentialsRoot() {return CREDENTIALS_ROOT;}
	public static String getCredentialsElement() {return CREDENTIALS_ELEMENT;}
	public static String getCredentialsName() {return TAG_NAME;}
	public static String getCredentialsUser() {return TAG_USERNAME;}
	public static String getCredentialsPass() {return TAG_PASSWORD;}
	public static String getCredentialsDateCreated() {return TAG_DATE_CREATED;}
	public static String getCredentialsExpiry() {return TAG_EXPIRY;}
	public static String getCredentialsDateLastUsed() {return TAG_DATE_LAST_USED;}
	public static String getCredentialsSite() {return TAG_SITE;}
	public static String getCredentialsNote() {return TAG_NOTE;}

	public static String getPathCardFile() { return getDirFileConf() + File.pathSeparatorChar + FILE_CARD; }
	public static String getCreditCardsRoot(){ return CREDIT_CARDS_ROOT; }
	public static String getCardsElement() { return CARD_ELEMENT; }
	public static String getCardsName() { return TAG_NAME; }
	public static String getCardsNumber() { return TAG_NUMBER; }
	public static String getCardsPIN() { return TAG_PIN; }
	public static String getCardsCVV() { return TAG_CVV; }
	public static String getCardsPhone() { return TAG_PHONE; }
	public static String getCardsCircuits() { return TAG_CIRCUITS; }
	public static String getCardsExpiry() { return TAG_EXPIRY; }
	public static String getCardsBalance() { return TAG_BALANCE; }
    public static String getCardHolder() { return TAG_HOLDER; }
    public static String getCardBillAddress() { return TAG_BILL_ADDRESS; }
	public static String getCardsBank() { return TAG_BANK; }
	public static String getCardsWebSite() { return TAG_WEBSITE; }
	public static String getCardsNote() { return TAG_NOTE; }
	
	public static String getPathAccFile() { return getDirFileConf() + File.pathSeparatorChar + FILE_ACC;}
    public static String getAccountRoot() { return ACCOUNT_ROOT;}
    public static String getAccountElement() { return ACCOUNT_ELEMENT;}
    public static String getAccountName() { return TAG_NAME;}
    public static String getAccountServer() { return TAG_SERVER;}
    public static String getAccountPath() { return TAG_PATH;}
    public static String getAccountUsername() { return TAG_USERNAME;}
    public static String getAccountPassword() { return TAG_PASSWORD;}
    public static String getAccountProvider() { return TAG_PROVIDER;}
    public static String getAccountProviderWebSite() { return TAG_SITE;}
    public static String getAccountProviderPhone() { return TAG_PHONE;}
    public static String getAccountNote() { return TAG_NOTE;}

}
